package com.example.carrierapp.viewmodel.viewmodel

import android.databinding.BaseObservable

class WaybillDetailsModel : BaseObservable() {

    var state = 1   //    运单编码

    var waybillCode = ""   //    运单编码

    var driverMainId = 0  //    司机主体id

    var driverName = ""   //    司机名称

    var driverPhone = ""   //    司机手机号

    var driverPicPath = ""   //    驾驶员图片路径

    var carId = 0  //    运输车辆id

    var carNumber = ""   //    运输车牌

    var owner = ""   //    车主

    var carPicPath = ""   //    车辆图片路径

    var ton = 0f  //    载重吨位

    var length = 0f  //    长度/米

    var carType = 0  //    车辆类型= ['0', '1', '2', '3', '4', '5', '6', '7']

    var carTypeName = ""  //    车辆类型名称

    var schedulingNum = 0f  //    调度量

    var loadingNum = 0f  //    装货量

    var unloadingNum = 0f  //    卸货量

    var creationTime = ""   //    运单创建时间及调度时间
        get() = if (field.isNullOrEmpty()) "" else field.replace("T", " ")

    var loadingTime = ""   //    装车时间
        get() = if (field.isNullOrEmpty()) "" else field.replace("T", " ")

    var loadingPhoto = ""   //    装车码单

    var loadingPicPath: MutableList<String>? = null //  装车码单路径

    var unloadingTime = ""   //    签收时间
        get() = if (field.isNullOrEmpty()) "" else field.replace("T", " ")

    var unloadingPhoto = ""   //    签收图片

    var unloadingPicPath: MutableList<String>? = null // 卸货码单路径

    var id = 0

}